<div class="al-modal-view">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" ng-click="cancel()">
      <span aria-hidden="true" class="glyphicon glyphicon-remove"></span>
      <span class="sr-only">Close</span>
    </button>
    <h4 class="modal-title ok-color">{{modalTitle}}</h4>
  </div>
  <div class="modal-body">
      <ng-form name="modalForm" class="form-horizontal form-validation" role="form">
        <div class="form-group">
          <label class="col-sm-3 control-label">所属公寓</label>
          <div class="col-sm-8">
            <div class="form-control">{{info.apartmentName}}</div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">所属房型</label>
          <div class="col-sm-8">
            <div class="form-control">{{info.layoutName}}</div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">图片</label>
          <div class="col-sm-8">
            <div class="input-group">
              <input type="text"  name="layoutImage" class="form-control" ng-model="data.url">
              <span class="input-group-addon" ng-click="showPhotoUpload=!showPhotoUpload">
                    <i class="glyphicon glyphicon-upload"></i>
                  </span>
            </div>
          </div>
        </div>
        <div class="form-group" ng-if="data.url">
          <div class="col-sm-8 col-sm-offset-3">
            <div class="wf-thumbnail-container">
              <img ng-src="{{data.url}}" class="wf-thumbnail" alt="找不到该图片" maxlength="1024">
            </div>
          </div>
        </div>
        <div class="form-group" ng-show="showPhotoUpload">
          <div class="col-sm-8 col-sm-offset-3">
            <input id="photo-upload-input" class="file" name="file" type="file" data-min-file-count="1">
          </div>
        </div>
        <!--<div class="form-group">-->
          <!--<label class="col-sm-3 control-label">类型</label>-->
          <!--<div class="col-sm-8">-->
            <!--<input class="form-control" ng-model="data.type" type="text"-->
                   <!--placeholder="类型" maxlength="50"/>-->
          <!--</div>-->
        <!--</div>-->
        <div class="form-group">
          <label class="col-sm-3 control-label">图片内容</label>
          <div class="col-sm-8">
            <textarea class="form-control" ng-model="data.imageContent" cols="3"
                      placeholder="图片内容"></textarea>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">图片备注</label>
          <div class="col-sm-8">
            <textarea class="form-control" ng-model="data.description" cols="3" maxlength="1024"
                      placeholder="图片备注"></textarea>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">链接</label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.link" type="text"
                   placeholder="图片链接" maxlength="255"/>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">序号<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.sorting" type="text" required
                   placeholder="序号" maxlength="11"/>
          </div>
        </div>
      </ng-form>
  </div>
  <div class="modal-footer">
    <button class="btn btn-warning no-border" type="button" ng-click="cancel()">取消</button>
    <button class="btn btn-primary no-border" type="button" ng-click="confirm()" ng-disabled="modalForm.$invalid">确定</button>
  </div>
</div>